package com.example.barcodeapp.ui.huodong.activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.widget.Toolbar;

import com.bumptech.glide.Glide;
import com.example.barcodeapp.R;
import com.example.barcodeapp.base.BaseActivity;
import com.example.barcodeapp.common.Constants;
import com.example.barcodeapp.interfaces.IBasePersenter;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.persenter.OnePresenterErWeiMa;
import com.example.barcodeapp.ui.huodong.Bean.HuoDongXiangQingBean;
import com.example.barcodeapp.ui.wode.bean.WoDHuoDong;
import com.example.barcodeapp.ui.wode.bean.erweimaBean;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ErWeiMaActivity extends BaseActivity<IOwn.Persentererweima> implements IOwn.Viewerweima {
    @BindView(R.id.iv_back_circle)
    ImageView ivBackCircle;
    @BindView(R.id.ff_back_contener)
    FrameLayout ffBackContener;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_location)
    TextView tvLocation;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.ll_to_search)
    LinearLayout llToSearch;
    @BindView(R.id.right_iv)
    ImageView rightIv;
    @BindView(R.id.right_iv_two)
    ImageView rightIvTwo;
    @BindView(R.id.tv_rught_)
    TextView tvRught;
    @BindView(R.id.tv_right_two)
    TextView tvRightTwo;
    @BindView(R.id.toolBar)
    Toolbar toolBar;
    @BindView(R.id.tou)
    LinearLayout tou;
    @BindView(R.id.neirong)
    TextView neirong;
    @BindView(R.id.didian)
    TextView didian;
    @BindView(R.id.jiage)
    TextView jiage;
    @BindView(R.id.erweimaa)
    ImageView erweimaa;
    @BindView(R.id.linearLayout10)
    LinearLayout linearLayout10;
    @BindView(R.id.textView59)
    TextView textView59;
    @BindView(R.id.youxiaoriqi)
    TextView youxiaoriqi;
    @BindView(R.id.textView60)
    TextView textView60;
    @BindView(R.id.tv62)
    TextView tv62;
    @BindView(R.id.tv63)
    TextView tv63;
    @BindView(R.id.tv64)
    TextView tv64;
    private String data;
    private String id;

    @Override
    protected int getLayout() {
        return R.layout.erweima;
    }
    @Override
    protected void initView() {
        setToolBar(true, false, true, false, false);
        setTitle("查看电子码", R.color.black, R.color.white);
        Intent intent = getIntent();
        id = intent.getStringExtra("id");

    }

    @Override
    protected OnePresenterErWeiMa initPersenter() {
        return new OnePresenterErWeiMa();
    }

    @Override
    protected void initData() {
        persenter.geteriweima(1,10);
    }

    @Override
    public void geteriweima(erweimaBean xiLieKeBean) {
        if (xiLieKeBean.getData().getErweima().isEmpty()){

        }else {
            Glide.with(this).load(Constants.Base_TPUrl2 +xiLieKeBean.getData().getErweima()).into(erweimaa);
        }
        if (xiLieKeBean.getData().getDdnum().isEmpty()){

        }else {
            textView59.setText(xiLieKeBean.getData().getDdnum());
        }

    }
}
